package com.example.springaop.aspect;

import lombok.extern.slf4j.Slf4j;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.*;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

@Slf4j
@Aspect
//@Component
@Order(1)//order越小优先级越高
public class AspectDemo2 {

    //前置通知
    @Before("com.example.springaop.aspect.AspectDemo.pt()")
    public void doBefore(){
        log.info("AspectDemo2 before 执行");
    }
    @After("com.example.springaop.aspect.AspectDemo.pt()")
    public void doAfter(){
        log.info("AspectDemo2 After 执行");
    }

}
